This invention relates generally to methods and apparatus for signal processing; and, in particular, to methods and apparatus for computing the phase of a complex number for remote access/networking and wireless communication applications.
In some signal processing applications, it is necessary to be able to accurately compute the phase of a complex number. This is useful, for example, in modem data communications wherein phase angle is calculated for data encoded in IQ constellation format. This is also useful, for example, in automatic frequency control (AFC) for receivers of proposed wideband CDMA mobile communications systems which enable Internet access and video communications over wireless telephone installations. Here, phase corresponds to carrier frequency offset and phase must be accurately calculated in order to be able to closely track carrier frequency. This offset can be calculated from the argument of I+jQ, where I and Q are n-bit (viz. 20-bit) binary numbers. To meet system requirements, the argument must be calculated using a digital signal processor (DSP) to an accuracy of about 0.02 degrees.
Some prior art methods use a lookup table to find the arctangent. This does not lead to an accurate result unless very large lookup tables are used.
Another prior art method uses large tables of polynomial coefficients and reference values. Such approach is described in U.S. Pat. No. 5,648,924, issued Jul. 15, 1997, entitled xe2x80x9cMethod and Apparatus for Finding Arctangents,xe2x80x9d incorporated herein by reference.
Yet another approach is the CORDIC method which was developed for real-time high precision computations in the 1950""s. Unified CORDIC by Walther is used in calculators to perform trigonometric functions, inverse trigonometric functions, hyperbolic functions, and the like. CORDIC is an iterative approach, using additions and shifts to give an added bit of precision with each iteration. Thus, for 16-bit precision, 16 iterations are required. An example CORDIC calculation is given in an Appendix attached hereto and forming a part hereof.
The described prior art approaches either use large amounts of memory or are computationally intensive.
The invention provides a method and apparatus for accurately finding the phase of a complex number using low computational complexity, without the requirement for a large lookup table.
The invention uses a hybrid two-step process to find the argument xcex8 of an n-bit complex number I+jQ. The first step utilizes a limited lookup to get a rough angle xcex8xcx9c from the approximation Ixcx9c+jQxcx9c of the number, using the first m (m less than n) bits of the number. The second step finds the remaining angle correction xcex94xcex8 through a rotation obtained by multiplying the number I+jQ by the conjugate of the approximation Ixcx9c+jQxcx9c, to get the complete angle of I+jQ. The second step assumes that arctan xcex94xcex8=xcex94xcex8 (where xcex94xcex8 is the difference phase angle with the real axis) for small values of xcex94xcex8.
The inventive approach gives improved performance over the CORDIC approach, using a slightly larger lookup table but lower computational complexity. For example, CORDIC uses a 16-word table for 16-bit accuracy; whereas, the inventive approach uses a 100-word table (plus an additional 256 words, if a second lookup table is used instead of division).